package com.example.project3.controller;

import com.example.project3.service.impl.WorkGroupServiceImpl;
import com.example.project3.util.API;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName WorkGroupController .java
 * @Description empty
 * @Author LiuJinyu
 * @Date 2023/6/6 15:31
 * @Version 1.0
 */
@RestController
@RequestMapping("/wg")
public class WorkGroupController {

    private WorkGroupServiceImpl workGroupServiceImpl;

    @GetMapping("/p")
    public API getGroupWorkerByProjectId(@RequestParam Integer projectId) {
        return API.success(workGroupServiceImpl.getTeamMemberByProjectId(projectId));
    }

    @Autowired
    public void setWorkGroupServiceImpl(WorkGroupServiceImpl workGroupServiceImpl) {
        this.workGroupServiceImpl = workGroupServiceImpl;
    }
}
